'use strict';

const Controller = require('egg').Controller;

class PostController extends Controller {

    // 首页列表
    async index(ctx) {

        const posts = await this.service.post.findAll({pub:'1'});

        ctx.body = {
            code:200,
            data:posts,
            errorMsg:""
        }

    }

}
module.exports = PostController;
